}
exports.config = {
-
- //
- // ======
- //
// ======
// Custom
// ======
// Enables colors for log output.
coloredLogs: true,
//
+ // Warns when a deprecated command is used
+ deprecationWarnings: true,
+ //
+ // If you only want to run your tests until a specific amount of tests have failed use
+ // bail (default is 0 - don't bail, run all tests).
+ bail: 0,
+ //
// Saves a screenshot to a given path if a command fails.
screenshotPath: './log/',
//
- // Set a base URL in order to shorten url command calls. If your url parameter starts
- // with "/", then the base url gets prepended.
+ // Set a base URL in order to shorten url command calls. If your `url` parameter starts
+ // with `/`, the base url gets prepended, not including the path portion of your baseUrl.
+ // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
+ // gets prepended directly.
baseUrl: (
process.env.MW_SERVER === undefined ?
'http://127.0.0.1:8080' :
// WebdriverRTC: https://github.com/webdriverio/webdriverrtc
// Browserevent: https://github.com/webdriverio/browserevent
// plugins: {
- // webdrivercss: {
- // screenshotRoot: 'my-shots',
- // failedComparisonsRoot: 'diffs',
- // misMatchTolerance: 0.05,
- // screenWidth: [320,480,640,1024]
- // },
- // webdriverrtc: {},
- // browserevent: {}
+ // webdrivercss: {
+ // screenshotRoot: 'my-shots',
+ // failedComparisonsRoot: 'diffs',
+ // misMatchTolerance: 0.05,
+ // screenWidth: [320,480,640,1024]
+ // },
+ // webdriverrtc: {},
+ // browserevent: {}
// },
//
// Test runner services
// Make sure you have the wdio adapter package for the specific framework installed
// before running any tests.
framework: 'mocha',
-
+ //
// Test reporter for stdout.
// The only one supported by default is 'dot'
// see also: http://webdriver.io/guide/testrunner/reporters.html
// it and to build services around it. You can either apply a single function or an array of
// methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
// resolved to continue.
- //
- // Gets executed once before all workers get launched.
- // onPrepare: function ( config, capabilities ) {
- // }
- //
- // Gets executed before test execution begins. At this point you can access all global
- // variables, such as `browser`. It is the perfect place to define custom commands.
+ /**
+ * Gets executed once before all workers get launched.
+ * @param {Object} config wdio configuration object
+ * @param {Array.<Object>} capabilities list of capabilities details
+ */
+ // onPrepare: function (config, capabilities) {
+ // },
+ /**
+ * Gets executed just before initialising the webdriver session and test framework. It allows you
+ * to manipulate configurations depending on the capability or spec.
+ * @param {Object} config wdio configuration object
+ * @param {Array.<Object>} capabilities list of capabilities details
+ * @param {Array.<String>} specs List of spec file paths that are to be run
+ */
+ // beforeSession: function (config, capabilities, specs) {
+ // },
+ /**
+ * Gets executed before test execution begins. At this point you can access to all global
+ * variables like `browser`. It is the perfect place to define custom commands.
+ * @param {Array.<Object>} capabilities list of capabilities details
+ * @param {Array.<String>} specs List of spec file paths that are to be run
+ */
// before: function (capabilities, specs) {
// },
- //
- // Hook that gets executed before the suite starts
- // beforeSuite: function (suite) {
+ /**
+ * Runs before a WebdriverIO command gets executed.
+ * @param {String} commandName hook command name
+ * @param {Array} args arguments that command would receive
+ */
+ // beforeCommand: function (commandName, args) {
// },
- //
- // Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
- // beforeEach in Mocha)
- // beforeHook: function () {
+ /**
+ * Hook that gets executed before the suite starts
+ * @param {Object} suite suite details
+ */
+ // beforeSuite: function (suite) {
// },
- //
- // Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
- // afterEach in Mocha)
- //
- // Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
+ /**
+ * Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
+ * @param {Object} test test details
+ */
// beforeTest: function (test) {
// },
- //
- // Runs before a WebdriverIO command gets executed.
- // beforeCommand: function (commandName, args) {
+ /**
+ * Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
+ * beforeEach in Mocha)
+ */
+ // beforeHook: function () {
// },
- //
- // Runs after a WebdriverIO command gets executed
- // afterCommand: function (commandName, args, result, error) {
+ /**
+ * Hook that gets executed _after_ a hook within the suite ends (e.g. runs after calling
+ * afterEach in Mocha)
+ */
+ // afterHook: function () {
// },
- //
- // Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
+ /**
+ * Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) ends.
+ * @param {Object} test test details
+ */
// from https://github.com/webdriverio/webdriverio/issues/269#issuecomment-306342170
afterTest: function ( test ) {
var filename, filePath;
console.log( '\n\tScreenshot location:', filePath, '\n' );
}
//
- // Hook that gets executed after the suite has ended
+ /**
+ * Hook that gets executed after the suite has ended
+ * @param {Object} suite suite details
+ */
// afterSuite: function (suite) {
// },
- //
- // Gets executed after all tests are done. You still have access to all global variables from
- // the test.
+ /**
+ * Runs after a WebdriverIO command gets executed
+ * @param {String} commandName hook command name
+ * @param {Array} args arguments that command would receive
+ * @param {Number} result 0 - command success, 1 - command error
+ * @param {Object} error error object if any
+ */
+ // afterCommand: function (commandName, args, result, error) {
+ // },
+ /**
+ * Gets executed after all tests are done. You still have access to all global variables from
+ * the test.
+ * @param {Number} result 0 - test pass, 1 - test fail
+ * @param {Array.<Object>} capabilities list of capabilities details
+ * @param {Array.<String>} specs List of spec file paths that ran
+ */
// after: function (result, capabilities, specs) {
// },
- //
- // Gets executed after all workers got shut down and the process is about to exit. It is not
- // possible to defer the end of the process using a promise.
- // onComplete: function(exitCode) {
+ /**
+ * Gets executed right after terminating the webdriver session.
+ * @param {Object} config wdio configuration object
+ * @param {Array.<Object>} capabilities list of capabilities details
+ * @param {Array.<String>} specs List of spec file paths that ran
+ */
+ // afterSession: function (config, capabilities, specs) {
+ // },
+ /**
+ * Gets executed after all workers got shut down and the process is about to exit.
+ * @param {Object} exitCode 0 - success, 1 - fail
+ * @param {Object} config wdio configuration object
+ * @param {Array.<Object>} capabilities list of capabilities details
+ */
+ // onComplete: function(exitCode, config, capabilities) {
// }
};